﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using SGCG.Model;

namespace SGCG.Actions
{
    public class CreateTriangleAction : BorderedObjectCreationAction<Triangle>
    {
        public CreateTriangleAction(PellBitmap bitmap) : base(bitmap) { }

        protected override Triangle CreateObject(int x, int y)
        {
            return new Triangle(null)
            {
                X1 = x,
                Y1 = y,
                X2 = x,
                Y2 = y,
                X3 = x,
                Y3 = y,
                LineStyle = LineStyle.Normal,
                LineThickness = LineThickness.Normal,
                Color = Colors.Black
            };
        }

        protected override bool HasMorePoints()
        {
            return this.CurrentPoint < 3;
        }
    }
}
